google.load('search', '1');

var ${id};

function loadSearchControl${id}() {
	
  // Create a search control
  ${id} = new google.search.SearchControl();

  // Add in a full set of searchers
  var localSearch = new google.search.LocalSearch();
  ${id}.addSearcher(localSearch);
  ${id}.addSearcher(new google.search.WebSearch());
  ${id}.addSearcher(new google.search.VideoSearch());
  ${id}.addSearcher(new google.search.BlogSearch());
  ${id}.addSearcher(new google.search.NewsSearch());
  ${id}.addSearcher(new google.search.ImageSearch());
  ${id}.addSearcher(new google.search.BookSearch());
  ${id}.addSearcher(new google.search.PatentSearch());

  // Set the Local Search center point
  localSearch.setCenterPoint("New York, NY");

  // tell the searcher to draw itself and tell it where to attach
  ${id}.draw(document.getElementById("${id}"));

  // execute an inital search
  if( "${initialSearch}" != "" ) {
	  ${id}.execute( '${initialSearch}' );
  }
}
google.setOnLoadCallback(loadSearchControl${id});
